<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>let 和 var 的全局声明</title>
</head>
<body>
  <script>
    var name = 'Matt';
    console.log(window.name);

    let age = 26;
    console.log(window.age);
  </script>
</body>
</html>